import request from '@/utils/request'

export function addNotice(data) {
  return request({
    url: '/notice',
    method: 'post',
    data
  })
}

export function delNotice(id) {
  return request({
    url: '/notice',
    method: 'delete',
    params: {
      id: id
    }
  })
}

export function modifyNotice(payload) {
  return request({
    url: '/notice',
    method: 'put',
    data: { content: payload.content },
    params: {
      id: payload.id
    }
  })
}

export function getNotice(payload) {
  return request({
    url: '/notice',
    method: 'get',
    params: {
      id: payload.id,
      title: payload.title,
      page: payload.page,
      pageSize: payload.pageSize
    }
  })
}

